package com.caac.core.dm;

import java.util.Date;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright caac 2004</p>
 * <p>Company: caac</p>
 * @author <a href="mailto:project@caac.com.cn">Project Group</a>
 * @version 1.0
 */

public class SessionUser extends BaseDm {
	private static final long serialVersionUID = 1L;
	private String id;
    private String username;
    private String realName;
    private String unitCode;
    private String unitName;
    private String operateUrl;
    private Date loginTime;
    private String ipAddress;

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {

        return username;
    }

    public void setUsername(String username) {

        this.username = username;
    }

    public String getRealName() {
        return realName;
    }

    public String getUnitCode() {
        return unitCode;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public void setUnitCode(String unitCode) {
        this.unitCode = unitCode;
    }

    public String getUnitName() {
        return unitName;
    }

    public String getOperateUrl() {
        return operateUrl;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public void setOperateUrl(String operateUrl) {
        this.operateUrl = operateUrl;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    protected int doHashCode() {
        return getHashCodeBuilder().append(username).toHashCode();
    }

    protected boolean doEquals(Object object) {
        SessionUser other = (SessionUser) object;
        return getEqualsBuilder().append(username, other.username).isEquals();
    }
}
